<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="webwork" prefix="s"%>
<!doctype html>
<html>
<head>
<%@ include file="/common/head-system.jsp"%>
</head>
<body>
	<s:actionerror />
	<s:actionmessage />
	<div>
		<h1>操作<span id="successText">完毕</span>，正在跳转...</h1>
	</div>
	<div>
		<a href="<s:url value="/"/>">返回首页</a>
	</div>
</body>
<s:if test="hasErrors()">
<script type="text/javascript">
	window.hasErrors = true;
</script>
</s:if>
<s:else>
<script type="text/javascript">
	window.hasErrors = false;
</script>
</s:else>
<script type="text/javascript">
	var t = window.hasErrors? "失败":"成功";
	document.getElementById("successText").innerHTML=t;
	if (parent && parent.refreshQuery){
		if(window.hasErrors){
			parent.alert("操作失败");
		}
		parent.refreshQuery();
	}else if (window.opener && window.opener.refreshQuery) {
		window.opener.refreshQuery();
		alert("操作"+t+"，关闭该窗口");
		window.close();
	} else {
		alert("操作"+t+"，关闭该窗口");
		window.close();
	}
</script>
</html>